package com.example.seataorder;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author MoodAir
 */
@Service
@RequiredArgsConstructor
public class OrderService {
    
    private final OrderDao orderDao;
    
    
    public void saveOrder(Long productId, Integer count) {
        Order order = new Order();
        order.setCount(count);
        order.setMoney(100L);
        order.setProductId(productId);
        order.setStatus(1);
        order.setUserId(1L);
        orderDao.save(order);
    }
}
